$(function () {
    let data = myAjax("/home", {}, "get", {});

    let news = data[0].object.newsModelList;
    let product = data[0].object.productModelList;

    setNews(news);
    setProduct(product);
})

function setNews(data) {
    let html = '';
    for (let i = 0; i < data.length; i++) {
    html+='<div>\n' +
        '                        <h4>'+data[i].title+'</h4>\n' +
        '                        <p>'+data[i].content+'</p>\n' +
        '                    </div>';
    }
    $("#news").html(html);
}

function setProduct(data) {

}